import { createApp } from 'vue'
import 'amfe-flexible'
import App from './App.vue'
import { Button, Field, CellGroup, Tabbar, TabbarItem, Swipe,Image as VanImage,
     SwipeItem, Grid, GridItem, Popup, Card ,Tag, RadioGroup, Radio,Icon,NavBar,
     Cell, Dialog,Empty,List,PullRefresh,Loading,Tabs,Tab } from 'vant'
import { ConfigProvider } from 'vant';
import 'vant/lib/index.css'
import store from './store'
import router from './router'
import './styles/global.scss'
import { createPinia } from 'pinia'
import { useUserStore } from './store/user'
import './styles/theme.scss'

const app = createApp(App)
const pinia = createPinia()
app.use(pinia)

// 初始化用户信息
const userStore = useUserStore()
userStore.initUserInfo()

app.use(Button)
app.use(Field)
app.use(CellGroup)
app.use(Tabbar)
app.use(TabbarItem)
app.use(router)
app.use(ConfigProvider)
app.use(Swipe)
app.use(SwipeItem)
app.use(Grid)
app.use(GridItem)
app.use(VanImage)
app.use(Popup)
app.use(Card)
app.use(Tag)
app.use(RadioGroup)
app.use(Radio)
app.use(Icon)
app.use(Empty)
app.use(NavBar)
app.use(Cell)
app.use(Dialog)
app.use(List)
app.use(Loading)
app.use(PullRefresh)
app.use(Tabs)
app.use(Tab)
app.mount('#app')
